<br /><br />

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />    <title>Agregar nuevo Expediente</title>    
</head>
<body>

    <div id="content">
      <form class="pure-form pure-form-aligned" enctype="application/x-www-form-urlencoded" action="<?php echo $this->url(array('controller'=>'Expediente',
            'action'=>'index'));?>" method="post" id = 'form'>
            
            <fieldset>
                <legend>Buscar</legend>
                <div class="pure-g-r">
                    <div class="pure-u-1-2">  
                        <div class="pure-control-group">
                            <label for="placa" class="required">Placa </label>    
                            <input type="text" name="placa" value="" id="placa" placeholder="Placa" />
                        </div>  
                    </div>
                    <div class="pure-u-1-2">  
                        <div class="pure-control-group">
                            <label for="observacion" class="required">&nbsp;</label>    
                            <input class="pure-button pure-button-primary" type="submit" name="submit" id="submitbutton" value="Buscar"/>
                        </div>
                    </div>
                </div>      
                
            </fieldset>

            
        </form>
        <?php if(count($this->vehicle) > 0 ):?>
        <form class="pure-form pure-form-aligned" enctype="application/x-www-form-urlencoded" action="<?php echo $this->url(array('controller'=>'Expediente',
            'action'=>'add'));?>" method="post" id = 'form'>
            <fieldset>
                <legend>Informaci&oacute;n</legend>
                <div class="pure-g-r">
                    <div class="pure-u-1-2">  
                        <div class="pure-control-group">
                            <label for="placa" class="required">Placa </label>    
                            <label for="placa" class="required"><?php echo $this->vehicle['placa']; ?> </label>
                            <input type="hidden" name="placa" value="<?php echo $this->vehicle['placa']; ?> "  />
                        </div>  
                    </div>
                    <div class="pure-u-1-2">  
                        <div class="pure-control-group">
                            <label for="placa" class="required">Observaciones </label>    
                            <label for="placa" class="required"><?php echo $this->vehicle['observaciones']; ?> </label>
                        </div>
                    </div>
                </div>      
                
            </fieldset>

            <fieldset>
                <legend>Lista Repuestos</legend>    
                                
            
                <table style="width:910px;" class="pure-table pure-table-bordered" id="piecelist">
                <thead>
                    <tr>
                        <th>Cantidad</th>
                        <th>Descripcion</th>
                        <th>Precio</th>                   
                        <th style="width: 50px;">&nbsp;</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td><input style="box-shadow: inset 0 0 0 #fff; border: none;" type="text" name="cantidad" value="" id="cantidad" placeholder="Cantidad" /></td>
                        <td><input style="box-shadow: inset 0 0 0 #fff; border: none;" type="text" name="descripcion" value="" id="descripcion" placeholder="Descripcion" /></td>
                        <td><input style="box-shadow: inset 0 0 0 #fff; border: none;" type="text" name="precio" value="" id="precio" placeholder="Precio" /></td>
                        <td><input class="pure-button pure-button-primary" type="button" name="button" id="button" value="Agregar" onclick="addPiece()" /></td>
                    </tr>
                </tbody>
                </table>
            </fieldset>         
            <fieldset>
                <legend>Servicios</legend>
                <table style="width:910px;" class="pure-table pure-table-bordered" id="serviceList">
                <thead>
                    <tr>
                        <th>Descripcion</th>
                        <th>Precio</th>
                        <th style="width: 50px;">&nbsp;</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td><input style="box-shadow: inset 0 0 0 #fff; border: none;" type="text" name="descripcionService" value="" id="descripcionService" placeholder="Descripcion" /></td>
                        <td><input style="box-shadow: inset 0 0 0 #fff; border: none;" type="text" name="precioService" value="" id="precioService" placeholder="Precio" /></td>
                        <td><input class="pure-button pure-button-primary" type="button" name="button" id="button" value="Agregar" onclick="addService()" /></td>
                    </tr>
                </tbody>
                </table>
                
                <input type="hidden" id="type" name="type">
                
                <div class="pure-g-r">
                    <div class="pure-u-1-2">  
                        <div class="pure-control-group">

                            <label ></label>
                                      <input class="pure-button pure-button-primary" type="submit" name="button" id="proforma" value="Guardar Proforma" onclick="addrecord('P')"/>
                        </div>      
                    </div>  
                    <div class="pure-u-1-2">  
                        <div class="pure-control-group">

                            <label ></label>
                                        <input class="pure-button pure-button-primary" type="submit" name="button" id="record" value="Guardar Expediente" onclick="addrecord('R')" />       
                        </div>      
                    </div>  
                
        </div>                      
        </fieldset>
        </form>
        <?php endif ?> 
    </div>
    
</body>
</html>